package com.qinhailin.portal.dbm.service;

import java.util.List;

import com.qinhailin.portal.dbm.po.Message;

public class DPListNoticeServiceImpl{

	@SuppressWarnings("unchecked")
	public List<Message> dp_listnotice() {
		return (List<Message>) com.jfinal.plugin.activerecord.Db.execute(new com.jfinal.plugin.activerecord.ICallback(){
			@Override
			public List<Message> call(java.sql.Connection conn) throws java.sql.SQLException {
				java.sql.CallableStatement proc = conn.prepareCall("{call dp_listsessionkilling()}");
				java.sql.ResultSet rs = proc.executeQuery();

				List<Message> list = new java.util.ArrayList<>();
				while(rs.next()){
					Message data = new Message();
					//data.setSPID(rs.getString("sPID"));
					//data.setXStartTime(rs.getTimestamp("xStartTime"));
					data.setXWXOpenID(rs.getString("xWXOpenID"));
					data.setXMsg(rs.getString("xMsg"));
					list.add(data);

				}
				return list;
			}
		});
	}

}
